import 'package:get/route_manager.dart';
import 'package:lz_ctcenter/kd_ctcenter.dart';
import 'package:lz_login/src/pages/kd_login.dart';
import 'package:lz_login/src/pages/kd_mine.dart';
import 'package:lz_login/src/pages/kd_mine_info.dart';
import 'package:lz_login/src/pages/kd_register.dart';
import 'package:lz_login/src/pages/kd_setting_page.dart';
import 'package:lz_router/kd_router.dart';
import 'package:lz_ctcenter/kd_ctcenter.dart';

import '../mixin/kd_user_mixin_plugin.dart';
import '../pages/kd_about_page.dart';
import '../pages/kd_cancellation_page.dart';
import '../pages/kd_change_phone_page.dart';
import '../pages/kd_change_pwd_page.dart';
import '../pages/kd_forget_pwd.dart';
// import '../pages/kd_input_pwd.dart';

class KDLoginRouter {
  /// 登录
  static String login = CommonRouterName.login.routerName;

  /// 注册
  static String register = "/register";

  /// 忘记密码
  static String forgetPwd = "/forgetPwd";

  /// 忘记密码第二步
  static String inputPwd = "/inputPwd";

  /// 身份认证
  static String identity = '/identity';

  /// 订购步骤
  static String orderStep = '/orderStep';

  /// 我的
  static String mine = '/mine';
  static String test = '/test';
  static String setting = '/setting';
  static String mineInfo = '/mineInfo';

  /// 我的-去认证
  static String certificationList = '/certificationList';

  /// 我的消息中心
  static String messageCenter = '/messageCenter';

  /// 注销
  static String cancellation = '/cancellation';

  /// 关于
  static String aboutPage = '/aboutPage';

  /// 修改手机
  static String changePhone = '/changePhone';

  /// 修改密码
  static String changePwd = '/changePwd';

  static registerAllRouter() {
    List<GetPage> list = [
      GetPage(
          name: CommonRouterName.login.routerName,
          page: () => const KDLoginPage()),
      GetPage(name: register, page: () => const KDRegisterPage()),
      GetPage(name: forgetPwd, page: () => const KDForgetPwdPage()),
      // GetPage(name: inputPwd, page: () => const KDInputPwdPage()),
      GetPage(name: mine, page: () => MyWidget()),
      GetPage(name: setting, page: () => KDSettingPage()),
      GetPage(name: mineInfo, page: () => KDMineInfoPage()),
      GetPage(name: cancellation, page: () => const KDCancellationPage()),
      GetPage(name: aboutPage, page: () => const KDAboutPage()),
      GetPage(name: changePhone, page: () => const KDChangePhonePage()),
      GetPage(name: changePwd, page: () => const KDChangePwdPage()),
    ];

    KDRouter.addList(list);

    KDCTManager.bindUser(KDUserMixinPlugin());
  }
}
